package net.zjitc.service.impl;

import net.zjitc.dao.ProductDao;
import net.zjitc.dao.impl.ProductDaoImpl;
import net.zjitc.domain.product;
import net.zjitc.service.ProductService;

import java.sql.SQLException;
import java.util.List;

/**
 * @Author admin
 * @Date 2019/2/25 10:57
 */
public class ProductServiceImpl implements ProductService {
    ProductDao dao = new ProductDaoImpl();
    @Override
    public List<product> findAll() throws SQLException {
        return dao.findAll();
    }

    @Override
    public void delete(String pid) throws SQLException {
        dao.delete(pid);
    }

    @Override
    public void add(product product) throws SQLException {
        dao.add(product);
    }

    @Override
    public product findByID(int pid) throws SQLException {
        return dao.findByID(pid);
    }

    @Override
    public void edit(product product, String pid) throws SQLException {
        dao.edit(product,pid);
    }
}
